package cn.com.biz;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.com.dao.YiShengDao;
import cn.com.entity.YiSheng;

public class YiShengBiz {
	private YiShengDao ysd;

	public YiShengDao getYsd() {
		return ysd;
	}

	public void setYsd(YiShengDao ysd) {
		this.ysd = ysd;
	}
	public boolean yiShengLogin(String uname,String upwd){
		ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
		ysd=(YiShengDao)ctx.getBean("ysDao");
		boolean b=ysd.yiShengLogin(uname, upwd);
		return b;
	}
	public List<YiSheng> chakanyisheng(){
		List<YiSheng> yslist=ysd.chakanyisheng();
		return yslist;
	}
	public boolean insertyisheng(int yishengid,int keshiid,String name){
		boolean b=ysd.insertyisheng(yishengid, keshiid, name);
		return b;
	}
}
